package com.yyfax.pay.third.model.to.fuioudeposit.xml;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.yyfax.framework.model.BasePO;
import com.yyfax.pay.common.util.XmlUtil;

/**
 * 响应xml
 * 
 * @author buyi
 * @date 2017-09-02 16:43:44
 * @since v2.0.0
 */
@SuppressWarnings("serial")
@XStreamAlias("plain")
public class BasePlain extends BasePO {
	@XStreamAlias("resp_code")
	private String rspCode;
	@XStreamAlias("resp_desc")
	private String rspMsg;
	@XStreamAlias("mchnt_cd")
	private String merchantCode;
	@XStreamAlias("amt")
	private String amount;
	@XStreamAlias("suc_amt")
	private String successAmount;
	@XStreamAlias("mchnt_txn_ssn")
	private String busiId;
	@XStreamAlias("txn_st")
	private String tradeState;

	public String getTradeState() {
		return tradeState;
	}

	public void setTradeState(String tradeState) {
		this.tradeState = tradeState;
	}

	public String getRspCode() {
		return rspCode;
	}

	public void setRspCode(String rspCode) {
		this.rspCode = rspCode;
	}

	public String getRspMsg() {
		return rspMsg;
	}

	public void setRspMsg(String rspMsg) {
		this.rspMsg = rspMsg;
	}

	public String getMerchantCode() {
		return merchantCode;
	}

	public void setMerchantCode(String merchantCode) {
		this.merchantCode = merchantCode;
	}

	public String getBusiId() {
		return busiId;
	}

	public void setBusiId(String busiId) {
		this.busiId = busiId;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getSuccessAmount() {
		return successAmount;
	}

	public void setSuccessAmount(String successAmount) {
		this.successAmount = successAmount;
	}

	public String toXml() {
		// QNameMap qmap = new QNameMap();
		// qmap.setDefaultPrefix("");
		// StaxDriver staxDriver = new StaxDriver(qmap);
		// XStream xstream = new XStream(staxDriver);
		// xstream.autodetectAnnotations(true);
		// xstream.ignoreUnknownElements();
		// xstream.alias("plain", this.getClass());
		// try {
		// StringWriter strWriter = new StringWriter();
		// StaxWriter sw = new StaxWriter(staxDriver.getQnameMap(), staxDriver.getOutputFactory().createXMLStreamWriter(strWriter), false, true);
		// xstream.marshal(this, sw);
		// sw.close();
		// return strWriter.toString().replace("__", "_");
		// } catch (Exception e) {
		// e.printStackTrace();
		// }
		// return null;
		return XmlUtil.toXmlWithoutPrefix(this, "plain");
	}
}
